/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.asseco.mio;

import com.asseco.mio.codex.City;
import com.asseco.mio.codex.Country;
import com.asseco.mio.codex.EduLvl;
import com.asseco.mio.codex.GeoArea;
import com.asseco.mio.codex.Municipality;
import com.asseco.mio.codex.Nationality;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import org.appfuse.model.BaseObject;
import org.hibernate.annotations.GenericGenerator;

/**
 *
 * @author gjoko.mitrovski
 */
@Entity
@Table(name = "BASIC_INFO")
public class BasicInfo extends BaseObject {

    private String id;
    private String lastName;
    private String fathersName;
    private String firstName;
    private String maidenName;
    private String gender;
    private String socScrNo;
    private Date birthDate;
    private Municipality birthMunicipality;
    private GeoArea birthArea;
    private Country birthCountry;
    private String addrStreet;
    private String number;
    private City city;
    private GeoArea area;
    private Country country;
    private Municipality municipality;
    private EduLvl eduLvl;
    private String school;
    private String department;
    private Nationality nationality;
    private Boolean status;
    private Date activeDate;
    private Date passiveDate;

     @Column(name = "NUMBER", length = 50)
    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }
 @Column(name = "ADDR_STREET", length = 100)
    public String getAddrStreet() {
        return addrStreet;
    }

    public void setAddrStreet(String addrStreet) {
        this.addrStreet = addrStreet;
    }
    @Column(name = "ACTIVE_DATE")
    @Temporal(value = javax.persistence.TemporalType.TIMESTAMP)
    public Date getActiveDate() {
        return activeDate;
    }

    public void setActiveDate(Date activeDate) {
        this.activeDate = activeDate;
    }
    @ManyToOne
 @JoinColumn(name = "AREA_ID")
    public GeoArea getArea() {
        return area;
    }

    public void setArea(GeoArea area) {
        this.area = area;
    }
    @ManyToOne
 @JoinColumn(name = "BIRTH_AREA_ID")
    public GeoArea getBirthArea() {
        return birthArea;
    }

    public void setBirthArea(GeoArea birthArea) {
        this.birthArea = birthArea;
    }
    @ManyToOne
 @JoinColumn(name = "BIRTH_MUNICIPALITY_ID")
    public Municipality getBirthMunicipality() {
        return birthMunicipality;
    }

    public void setBirthMunicipality(Municipality birthMunicipality) {
        this.birthMunicipality = birthMunicipality;
    }
    @ManyToOne
 @JoinColumn(name = "BIRTH_COUNTRY_ID")
    public Country getBirthCountry() {
        return birthCountry;
    }

    public void setBirthCountry(Country birthCountry) {
        this.birthCountry = birthCountry;
    }
    @Column(name = "BIRTH_DATE")
    @Temporal(value = javax.persistence.TemporalType.TIMESTAMP)
    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }
    @ManyToOne
 @JoinColumn(name = "CITY_ID")
    public City getCity() {
        return city;
    }

    public void setCity(City city) {
        this.city = city;
    }
    @ManyToOne
 @JoinColumn(name = "COUNTRY_ID")
    public Country getCountry() {
        return country;
    }

    public void setCountry(Country country) {
        this.country = country;
    }
 @Column(name = "DEPARTMENT", length = 100)
    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }
    @ManyToOne
 @JoinColumn(name = "EDU_LVL_ID")
    public EduLvl getEduLvl() {
        return eduLvl;
    }

    public void setEduLvl(EduLvl eduLvl) {
        this.eduLvl = eduLvl;
    }
 @Column(name = "FATHERS_NAME", length = 100)
    public String getFathersName() {
        return fathersName;
    }

    public void setFathersName(String fathersName) {
        this.fathersName = fathersName;
    }
 @Column(name = "FIRST_NAME", length = 100)
    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }
 @Column(name = "GENDER", length = 100)
    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }
 @Id
    @GeneratedValue(generator = "system-uuid")
    @Column(length = 40)
@GenericGenerator(name = "system-uuid", strategy = "uuid")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
 @Column(name = "LAST_NAME", length = 100)
    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }
 @Column(name = "MAIDEN_NAME", length = 100)
    public String getMaidenName() {
        return maidenName;
    }

    public void setMaidenName(String maidenName) {
        this.maidenName = maidenName;
    }
    @ManyToOne
 @JoinColumn(name = "MUNICIPALITY_ID")
    public Municipality getMunicipality() {
        return municipality;
    }

    public void setMunicipality(Municipality municipality) {
        this.municipality = municipality;
    }
    @ManyToOne
 @JoinColumn(name = "NATIONALITY_ID")
    public Nationality getNationality() {
        return nationality;
    }

    public void setNationality(Nationality nationality) {
        this.nationality = nationality;
    }
    @Column(name = "PASSIVE_DATE")
    @Temporal(value = javax.persistence.TemporalType.TIMESTAMP)
    public Date getPassiveDate() {
        return passiveDate;
    }

    public void setPassiveDate(Date passiveDate) {
        this.passiveDate = passiveDate;
    }
 @Column(name = "SCHOOL", length = 100)
    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }
 @Column(name = "SOC_SCR_NO", length = 13)
    public String getSocScrNo() {
        return socScrNo;
    }

    public void setSocScrNo(String socScrNo) {
        this.socScrNo = socScrNo;
    }
 @Column(name = "STATUS")
    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "BasicInfo{" + "id=" + id + "lastName=" + lastName + "fathersName=" + fathersName + "firstName=" + firstName + "maidenName=" + maidenName + "gender=" + gender + "socScrNo=" + socScrNo + "birthDate=" + birthDate + "birthMunicipality=" + birthMunicipality + "birthArea=" + birthArea + "birthCountry=" + birthCountry + "addrStreet=" + addrStreet + "number=" + number + "city=" + city + "area=" + area + "country=" + country + "municipality=" + municipality + "eduLvl=" + eduLvl + "school=" + school + "department=" + department + "nationality=" + nationality + "status=" + status + "activeDate=" + activeDate + "passiveDate=" + passiveDate + '}';
    }

    

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final BasicInfo other = (BasicInfo) obj;
        if ((this.id == null) ? (other.id != null) : !this.id.equals(other.id)) {
            return false;
        }
        if ((this.lastName == null) ? (other.lastName != null) : !this.lastName.equals(other.lastName)) {
            return false;
        }
        if ((this.fathersName == null) ? (other.fathersName != null) : !this.fathersName.equals(other.fathersName)) {
            return false;
        }
        if ((this.firstName == null) ? (other.firstName != null) : !this.firstName.equals(other.firstName)) {
            return false;
        }
        if ((this.maidenName == null) ? (other.maidenName != null) : !this.maidenName.equals(other.maidenName)) {
            return false;
        }
        if ((this.gender == null) ? (other.gender != null) : !this.gender.equals(other.gender)) {
            return false;
        }
        if ((this.socScrNo == null) ? (other.socScrNo != null) : !this.socScrNo.equals(other.socScrNo)) {
            return false;
        }
        if (this.birthDate != other.birthDate && (this.birthDate == null || !this.birthDate.equals(other.birthDate))) {
            return false;
        }
        if (this.birthMunicipality != other.birthMunicipality && (this.birthMunicipality == null || !this.birthMunicipality.equals(other.birthMunicipality))) {
            return false;
        }
        if (this.birthArea != other.birthArea && (this.birthArea == null || !this.birthArea.equals(other.birthArea))) {
            return false;
        }
        if (this.birthCountry != other.birthCountry && (this.birthCountry == null || !this.birthCountry.equals(other.birthCountry))) {
            return false;
        }
        if ((this.addrStreet == null) ? (other.addrStreet != null) : !this.addrStreet.equals(other.addrStreet)) {
            return false;
        }
        if ((this.number == null) ? (other.number != null) : !this.number.equals(other.number)) {
            return false;
        }
        if (this.city != other.city && (this.city == null || !this.city.equals(other.city))) {
            return false;
        }
        if (this.area != other.area && (this.area == null || !this.area.equals(other.area))) {
            return false;
        }
        if (this.country != other.country && (this.country == null || !this.country.equals(other.country))) {
            return false;
        }
        if (this.municipality != other.municipality && (this.municipality == null || !this.municipality.equals(other.municipality))) {
            return false;
        }
        if (this.eduLvl != other.eduLvl && (this.eduLvl == null || !this.eduLvl.equals(other.eduLvl))) {
            return false;
        }
        if ((this.school == null) ? (other.school != null) : !this.school.equals(other.school)) {
            return false;
        }
        if ((this.department == null) ? (other.department != null) : !this.department.equals(other.department)) {
            return false;
        }
        if (this.nationality != other.nationality && (this.nationality == null || !this.nationality.equals(other.nationality))) {
            return false;
        }
        if (this.status != other.status && (this.status == null || !this.status.equals(other.status))) {
            return false;
        }
        if (this.activeDate != other.activeDate && (this.activeDate == null || !this.activeDate.equals(other.activeDate))) {
            return false;
        }
        if (this.passiveDate != other.passiveDate && (this.passiveDate == null || !this.passiveDate.equals(other.passiveDate))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        throw new UnsupportedOperationException("Not supported yet.");
    }




}
